3.2.82 \(\int \csc (e+f x) (b \tan (e+f x))^n \, dx\) [182]

Optimal. Leaf size=78 \[ -\frac {\cos (e+f x) \, _2F_1\left (\frac {1-n}{2},\frac {2-n}{2};\frac {3-n}{2};\cos ^2(e+f x)\right ) \sin ^2(e+f x)^{-n/2} (b \tan (e+f x))^n}{f (1-n)} \]

[Out]

-cos(f*x+e)*hypergeom([1-1/2*n, 1/2-1/2*n],[3/2-1/2*n],cos(f*x+e)^2)*(b*tan(f*x+e))^n/f/(1-n)/((sin(f*x+e)^2)^
(1/2*n))

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2681, 2656} \begin {gather*} -\frac {\cos (e+f x) \sin ^2(e+f x)^{-n/2} (b \tan (e+f x))^n \, _2F_1\left (\frac {1-n}{2},\frac {2-n}{2};\frac {3-n}{2};\cos ^2(e+f x)\right )}{f (1-n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]*(b*Tan[e + f*x])^n,x]

[Out]

-((Cos[e + f*x]*Hypergeometric2F1[(1 - n)/2, (2 - n)/2, (3 - n)/2, Cos[e + f*x]^2]*(b*Tan[e + f*x])^n)/(f*(1 -
 n)*(Sin[e + f*x]^2)^(n/2)))

Rule 2656

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b^(2*IntPar
t[(n - 1)/2] + 1))*(b*Sin[e + f*x])^(2*FracPart[(n - 1)/2])*((a*Cos[e + f*x])^(m + 1)/(a*f*(m + 1)*(Sin[e + f*
x]^2)^FracPart[(n - 1)/2]))*Hypergeometric2F1[(1 + m)/2, (1 - n)/2, (3 + m)/2, Cos[e + f*x]^2], x] /; FreeQ[{a
, b, e, f, m, n}, x] && SimplerQ[n, m]

Rule 2681

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[Cos[e + f*x]
^n*((b*Tan[e + f*x])^n/(a*Sin[e + f*x])^n), Int[(a*Sin[e + f*x])^(m + n)/Cos[e + f*x]^n, x], x] /; FreeQ[{a, b
, e, f, m, n}, x] &&  !IntegerQ[n] && (ILtQ[m, 0] || (EqQ[m, 1] && EqQ[n, -2^(-1)]) || IntegersQ[m - 1/2, n -
1/2])

Rubi steps

\begin {align*} \int \csc (e+f x) (b \tan (e+f x))^n \, dx &=\left (\cos ^n(e+f x) \sin ^{-n}(e+f x) (b \tan (e+f x))^n\right ) \int \cos ^{-n}(e+f x) \sin ^{-1+n}(e+f x) \, dx\\ &=-\frac {\cos (e+f x) \, _2F_1\left (\frac {1-n}{2},\frac {2-n}{2};\frac {3-n}{2};\cos ^2(e+f x)\right ) \sin ^2(e+f x)^{-n/2} (b \tan (e+f x))^n}{f (1-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.24, size = 64, normalized size = 0.82 \begin {gather*} \frac {\, _2F_1\left (\frac {n}{2},n;1+\frac {n}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \left (\cos (e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right )\right )^n (b \tan (e+f x))^n}{f n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]*(b*Tan[e + f*x])^n,x]

[Out]

(Hypergeometric2F1[n/2, n, 1 + n/2, Tan[(e + f*x)/2]^2]*(Cos[e + f*x]*Sec[(e + f*x)/2]^2)^n*(b*Tan[e + f*x])^n
)/(f*n)

________________________________________________________________________________________

Maple [F]
time = 0.22, size = 0, normalized size = 0.00 \[\int \csc \left (f x +e \right ) \left (b \tan \left (f x +e \right )\right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)*(b*tan(f*x+e))^n,x)

[Out]

int(csc(f*x+e)*(b*tan(f*x+e))^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)*(b*tan(f*x+e))^n,x, algorithm="maxima")

[Out]

integrate((b*tan(f*x + e))^n*csc(f*x + e), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)*(b*tan(f*x+e))^n,x, algorithm="fricas")

[Out]

integral((b*tan(f*x + e))^n*csc(f*x + e), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (b \tan {\left (e + f x \right )}\right )^{n} \csc {\left (e + f x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)*(b*tan(f*x+e))**n,x)

[Out]

Integral((b*tan(e + f*x))**n*csc(e + f*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)*(b*tan(f*x+e))^n,x, algorithm="giac")

[Out]

integrate((b*tan(f*x + e))^n*csc(f*x + e), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (b\,\mathrm {tan}\left (e+f\,x\right )\right )}^n}{\sin \left (e+f\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*tan(e + f*x))^n/sin(e + f*x),x)

[Out]

int((b*tan(e + f*x))^n/sin(e + f*x), x)

________________________________________________________________________________________